package com.demo.spring.di.annotations;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 注解配置依赖注入bean：依赖类
 *
 * @author Nina
 * @create 2018/8/29 下午7:16
 */
@Component
public class Bean1 {
    @Autowired
    private Bean2 bean2;

    public void sayHello(){
        bean2.sayHello();
    }
}
